package isae.tp1;

public class Segment implements OG{
	Point p1;
        Point p2;

	public Segment(int x1,int y1, int x2, int y2) {
		p1=new Point(x1,y1);
                p2=new Point(x2,y2);
        }
        public String toString() {
		return "s:["+p1+","+p2+"]";
        }
	public void translater(int tx, int ty) {
		p1.translater(tx,ty);
		p2.translater(tx,ty);	
	}
         
	public void dilater(int lx, int ly) {
		int X=p1.x-p2.x;
		int Y=p1.y-p2.y;
                p2=new Point(p1.x + X*lx, p2.y + Y*ly);	
         }	
}
